
# 利用第三方容联云发短信
from celery_tasks.main import celery_app
from celery_tasks.sms import constants
from celery_tasks.sms.yuntongxun.sms import CCP


@celery_app.task(name='send_sms_code')   # 给以下的函数进行celery装饰
def send_sms_code(mobile, sms_code):
    CCP().send_template_sms(mobile, [sms_code, constants.SMS_CODE_EXPIRE_REDIS//60], 1)


